package com.panda.business.mapper;

import com.panda.business.domain.WeChatAccountInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WeChatAccountMapper {
	WeChatAccountInfo findWeChatAccountInfoByid(@Param("id") Integer id);

	WeChatAccountInfo findWeChatAccountInfoByDeviceid(@Param("deviceid") String deviceid);

    List<WeChatAccountInfo> findWeChatAccountInfoByWeChatIdNotEqualsDeviceid(@Param("wechatid") String wechatid, @Param("deviceid") String deviceid);

    List<WeChatAccountInfo> findAllIsLoginAccountWechatInfo();

	void delete(@Param("id") Integer id);

	WeChatAccountInfo findWeChatAccountInfoByWeChatId(@Param("wechatid") String wechatid);

	List<WeChatAccountInfo> findWeChatAccountInfo(@Param("cid") Integer cid, @Param("accountid") Long accountid);

	void update(WeChatAccountInfo info);

	void updateLogined(WeChatAccountInfo info);

	void updateOnline(WeChatAccountInfo info);

	void updateOnlineLogined(WeChatAccountInfo info);

	void updateAccountidOffline(@Param("id") Integer id, @Param("accountid") Long accountid);
}
